package com.zhiyin.seal.service;

import com.zhiyin.seal.entity.bo.*;

import java.util.List;

/**
 * 公司服务
 */
public interface CompanyService {

    Boolean addCompany(CompanyBo companyBo);

    List<CompanyBo> getAllCompanyList(String keywords);

    List<CompanyUserBo> getMyCompanyList(Long userId);

    List<CompanyBo> getCompanyListByIds(List<Long> companyIds);

    CompanyBo getCompanyById(Long id);

    CompanyBo getCompanyByNameSingle(String companyName);

    CompanyBo getLastCompanyByCreateUser(Long createUser);

    Boolean initDepartment(CompanyBo companyBo);

    Boolean addCompanyUser(Long userId,Long companyId);

    CompanyUserBo getLastCompanyUser(Long userId,Long companyId);

    Boolean setDefaultCompany(CompanyUserBo companyUserBo);

    CompanyBo getUserDefaultCompany(Long userId);

    Boolean switchCompany(Long userId,Long companyId);

    CompanyDepartmentBo getDepartmentById(Long id);

    List<CompanyDepartmentBo> getDepartmentListByCompanyId(Long companyId);

    List<CompanyDepartmentBo> getDepartmentListByDepartmentId(Long departmentId);

    List<CompanyUserBo> getAllUserList(Long companyId);

    List<CompanyUserBo> getUserListByCompanyId(Long companyId);

    List<CompanyUserBo> getUserListByDepartmentId(Long departmentId);

    Long getUserDepartmentId(Long companyId,Long userId);

    List<Long> getSubDepartmentIds(Long departmentId);

    List<Long> getParentDepartmentIds(Long departmentId);

    Boolean addDepartment(CompanyDepartmentBo companyDepartmentBo);

    Boolean addCompanyUser(CompanyUserBo companyUserBo);

    Boolean moveUserUp(Long userId, Long departmentId, Long companyId);

    Boolean moveUserDown(Long userId, Long departmentId, Long companyId);

    Boolean updateDepartmentName(String name,Long id);

    Boolean removeDepartment(Long id);

    Boolean updateUserAlias(Long userId,Long companyId,String userAlias);

    Boolean removeUser(Long userId,Long companyId);

    Boolean addCompanyAdmin(CompanyAdminBo companyAdminBo);

    Boolean deleteCompanyAdmin(Long userId,Long companyId);

    Boolean deleteAdminFunction(Long userId,Long companyId);

    Boolean deleteAdminSeal(Long userId,Long companyId);

    Boolean joinCompany(Long companyId,Long userId);

    Boolean joinCompany2(Long companyId,Long userId,String nickName);

    Boolean transferCompany(Long companyId,Long userId);

    Boolean removeCompanyAllAdmin(Long companyId);

    Boolean deleteAllAdminFunction(Long companyId);

    Boolean deleteAllAdminSeal(Long companyId);

    Boolean removeCompanyUser(Long companyId);

    List<CompanyAdminBo> getCompanyAdminList(Long companyId);

    List<AlarmRecordBo> getAlarmRecordList(Long companyId);

    List<CompanyContractTypeBo> getCompanyContractTypeList(Long companyId);

    List<CompanyContractTypeBo> getCompanyContractTypeListByParentId(Long id,Long companyId);

    Boolean addCompanyContractType(CompanyContractTypeBo companyContractTypeBo);

    Boolean deleteCompanyContractType(Long id);

    Boolean removeCompany(Long companyId);

    CompanyAuthBo getAuthCompany(String name);

    CompanyAuthBo authCompany(String name);

    Boolean updateCompanyAuthStatus(Long companyId);

    Boolean changeCompany(Long companyId,String name);

    UserBo getCompanyBelongUser(Long companyId);

    Integer getCompanyCount();

    void buildCompanyIdListByCompanyUserList(List<CompanyUserBo> companyUserBoList, List<Long> companyIds);

    void buildUserIdListByCompanyUserList(List<CompanyUserBo> companyUserBoList, List<Long> userIds);

    void buildUserInfoListByCompanyUserList(List<CompanyUserBo> companyUserBoList,List<UserBo> userBoList);

    void buildUserIdListByCompanyList(List<CompanyBo> companyBoList,List<Long> userIds);

    void buildUserIdListByCompanyAdminList(List<CompanyAdminBo> companyAdminBoList,List<Long> userIds);

    void buildUserInfoListByCompanyAdminList(List<CompanyAdminBo> companyAdminBoList,List<UserBo> userBoList);

    void buildUserIdsByAlarmRecordList(List<AlarmRecordBo> alarmRecordBoList,List<Long> userIds);
}
